package com.study.design.model.createPattern.builder;

import org.junit.Test;

/**
* @Name: Client
* @Description: 构建者模式测试类
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-2-10 下午6:36:28 
* @Version: V1.0
 */
public class Client {
	
	@Test
	public void test() {
		//创建宇宙飞船构建者对象
		AirShipDirector airShipDirector = new LcAirShipDirector(new LcAirShipBuilder()) ;
		//构建宇宙飞船
		AirShip airShip = airShipDirector.directAirShip() ;
		//获取各个组件的信息
		System.out.println(airShip.getOrbitalModule().getOrbitalModuleName());
		System.out.println(airShip.getEngine().getEngineName());
		System.out.println(airShip.getEngine().getEngineName());
	}

}
